package MultithreadingTest;

/**
 * @ClassName HelloThread
 * @Description TODO
 * @Author ZhaoKai
 * @Date 2021-12-1710:11
 * @Version 1.0
 **/
public class HelloThread extends Thread {
    public volatile boolean running = true;
    public void run() {
        System.out.println("HelloThread.run() start");
        int i = 0;
        while (running) {
            i++;
            System.out.println("HelloThread : " + i);
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                break;
            }
        }
        System.out.println("HelloThread.run() end");
    }
}
